Skip to content

GH-55475: [Dev] Use merge button instead of merge script - #55484

Open
rok wants to merge 9 commits into
apache:mainfrom
rok:gh-55475-merge-button
Open

rok wants to merge 9 commits into
apache:mainfrom
rok:gh-55475-merge-button

Conversation

@rok

@rok rok commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

Committers need a personal access token and dev/merge_arrow_pr.py to merge a pull request. With this change they can use the "Squash and merge" button instead.

What changes are included in this PR?

  • .github/boring-cyborg.yml: for a pull request to main, the Boring Cyborg app writes Closes #XXX to the GitHub Issue: line of the description, so GitHub closes the issue on merge. It leaves Refs #XXX on that line alone: that keeps the issue open for a partial fix. The "PR Title" status no longer accepts WIP: GH-XXX titles. It doesn't block the merge.
  • .github/workflows/dev_pr_merged.yml (new): does the rest of the issue update of the merge script. On a push to main with a GH-XXX: ... commit title, if GitHub closed the issue, it assigns the issue to the commit author if nobody is assigned and sets the next major release as the milestone if the issue has none.
  • dev/release/post-04-website.sh: "Patch Committers" is counted from who merged each pull request on GitHub. Button merges don't have the Signed-off-by: trailers it used.
  • Documentation: describes the merge button. The merge script still works and isn't changed.

Are these changes tested?

CI passes, but it doesn't run the new workflow: that can only run once this is on main. Locally, I ran the workflow step against apache/arrow with the writes printed instead of executed, checked the new patterns of the Boring Cyborg configuration against sample titles and descriptions, and compared the new committer count for 25.0.0..26.0.0 with the old one (395 merges, 390 from the trailers).

Are there any user-facing changes?

No.

Was AI used for this PR?

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

@rok rok changed the title GH-55475: [Dev] Use merge button instead of merge script WIP: GH-55475: [Dev] Use merge button instead of merge script Nov 10, 2026
@rok rok changed the title WIP: GH-55475: [Dev] Use merge button instead of merge script WIP: GH-55475: [Dev] Merge pull requests with a comment instead of the merge script Nov 10, 2026
@rok rok changed the title WIP: GH-55475: [Dev] Merge pull requests with a comment instead of the merge script WIP: GH-55475: [Dev] Use merge button instead of merge script Nov 10, 2026
@rok
rok force-pushed the gh-55475-merge-button branch from 4b8ed1c to c34e788 Compare November 10, 2026 21:02
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55475 has been automatically assigned in GitHub to PR creator.

@rok
rok force-pushed the gh-55475-merge-button branch 5 times, most recently from a681b72 to 8af40b8 Compare November 10, 2026 22:43
@rok rok changed the title WIP: GH-55475: [Dev] Use merge button instead of merge script GH-55475: [Dev] Use merge button instead of merge script Nov 10, 2026
@rok
rok force-pushed the gh-55475-merge-button branch 2 times, most recently from 96ffdb2 to 3a6799e Compare November 10, 2026 23:14
@rok
rok marked this pull request as ready for review November 10, 2026 23:24
Copilot AI balanced review requested due to automatic review settings November 10, 2026 23:24

This comment was marked as outdated.

@rok
rok force-pushed the gh-55475-merge-button branch from 3a6799e to 65e2f5a Compare November 10, 2026 23:41
Copilot AI balanced review requested due to automatic review settings November 10, 2026 23:41

This comment was marked as resolved.

@rok
rok force-pushed the gh-55475-merge-button branch from 65e2f5a to 36ac2dd Compare November 11, 2026 09:17
Copilot AI balanced review requested due to automatic review settings November 11, 2026 09:17

This comment was marked as resolved.

This comment was marked as low quality.

Comment thread dev/release/post-04-website.sh Resolved
@jorisvandenbossche

Copy link
Copy Markdown
Member

On the community meeting, it was mentioned that the top description is actually no longer up to date:

Boring Cyborg checks ... On PRs to main it fills the GitHub Issue: line with a native closing reference. For a partial fix, change that line to Refs and the issue number; the bot preserves it. Committers should check the issue line before merging, particularly for existing PRs. GitHub owns closure and records the resolving PR on the issue.

However, personally I think it is simpler to just rely on github's auto-closing of issues based on a "closes #.." (or equivalent). IMO it is simpler (for the maintainer, because that is in general how github works, and you don't have to know all details of our custom workflows) and avoids having additional custom workflow logic (it also allows the maintainer for whatever reason to not close the issue by merging the PR, or if we in the future want to use this practice more)

@jorisvandenbossche

Copy link
Copy Markdown
Member

And while we are touching the merge workflow, is there appetite in discussing what the commit message should be?
Currently, the docs in this PR say:

The pull request description is what you want as the commit
message. Remove leftovers of the pull request template in the
merge dialog if needed. You must remove CI directives such as
[skip ci]: GitHub doesn't run the workflow below for a commit
with them and you need to close the issue manually.

Would we be fine with just using the title (any co-authored-by lines as needed)?
Very often the PR description is very long (and often also not entirely up to date with the latest review round changes ... )

rok added 2 commits November 19, 2026 00:26
dev/release/post-04-website.sh published a partial count if one of
the GitHub requests failed. Also document that the script needs an
authenticated gh.
Address review comments: rely on GitHub closing the issue from a
closing keyword in the pull request description.

* The Boring Cyborg app writes "Closes #XXX" to the "GitHub Issue:"
  line of a pull request to main. It leaves "Refs #XXX" alone: that
  is for a partial fix, which keeps the issue open.
* The "Dev PR merged" workflow doesn't close the issue or comment on
  it anymore. It only assigns the issue and sets its milestone, and
  only if GitHub closed the issue. It doesn't need the "(#YYY)"
  suffix of the commit title anymore.
Copilot AI balanced review requested due to automatic review settings November 19, 2026 00:00

This comment was marked as low quality.

@rok

rok commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

On the community meeting, it was mentioned that the top description is actually no longer up to date:

Boring Cyborg checks ... On PRs to main it fills the GitHub Issue: line with a native closing reference. For a partial fix, change that line to Refs and the issue number; the bot preserves it. Committers should check the issue line before merging, particularly for existing PRs. GitHub owns closure and records the resolving PR on the issue.

However, personally I think it is simpler to just rely on github's auto-closing of issues based on a "closes #.." (or equivalent). IMO it is simpler (for the maintainer, because that is in general how github works, and you don't have to know all details of our custom workflows) and avoids having additional custom workflow logic (it also allows the maintainer for whatever reason to not close the issue by merging the PR, or if we in the future want to use this practice more)

Changed to use "closes #" 5619a5b. I like it's the github way of doing thing, but not sure either way.

@rok

rok commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

And while we are touching the merge workflow, is there appetite in discussing what the commit message should be? Currently, the docs in this PR say:

The pull request description is what you want as the commit
message. Remove leftovers of the pull request template in the
merge dialog if needed. You must remove CI directives such as
[skip ci]: GitHub doesn't run the workflow below for a commit
with them and you need to close the issue manually.

Would we be fine with just using the title (any co-authored-by lines as needed)? Very often the PR description is very long (and often also not entirely up to date with the latest review round changes ... )

Why would we not store a long message and keep git as the canonical history record (even if sometimes wildly wrong). It's possible to reduce verbosity of git log and other history viewers...

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a warning on the merge PR script suggesting committers to use the merge button now.

Comment thread .github/boring-cyborg.yml Resolved
Comment thread dev/release/post-04-website.sh Resolved
Comment thread dev/README.md Resolved
Comment thread docs/source/developers/overview.rst Resolved
Co-authored-by: Raúl Cumplido <raulcd@apache.org>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 11:29

This comment was marked as low quality.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 11:54

This comment was marked as low quality.

@rok
rok requested a review from pitrou as a code owner November 19, 2026 14:59
Copilot AI balanced review requested due to automatic review settings November 19, 2026 14:59

This comment was marked as low quality.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:25

This comment was marked as low quality.

@rok
rok force-pushed the gh-55475-merge-button branch from e4c5fb7 to fe4116a Compare November 19, 2026 15:33
Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:34

This comment was marked as low quality.

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in general looks good to me. @kou what do you think?

Comment thread .github/workflows/dev_pr_merged.yml Outdated
# because of "* GitHub Issue: Closes #XXX" in the pull request
# description. This sets what GitHub doesn't set: the assignee
# and the milestone of the issue.
- name: Update issue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a minor nit for easier debugging could be to split this Update issue into ~3 steps:

  • Get PR and issue
  • Assign issue
  • Assign milestone

So it's easier to see where it failed / debug steps etc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split into three steps in 20eb0e7: "Get issue", "Assign issue" and "Set milestone". The first step is "Get issue" and not "Get PR and issue" because the workflow reads the issue number from the commit title and does not fetch the pull request. The conditions are now if: of the steps, so a step that has nothing to do is shown as skipped.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 17:24

This comment was marked as low quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants